Managing volumes
Mount volume​
If you didn't mount your volume to the compute resource during the creation process, you can do it manually by using this command
$ cgc volume mount <volume_name> -t <name of compute resource>
t
- target (use thecompute create
name where you want to mount the volume)
Volume will be mounted in default path /workspace
, if you want to mount it elsewhere, use the -p
option.
example:
$ cgc volume mount getting-started -t getting-jupyter
PVC has been successfully mounted.
Mounting a volume requires restarting the compute resource to which the volume will be mounted. Any data stored on the ephemeral (temporary) disk storage will be lost. Before mounting the volume, make sure you have saved all the data you want to keep. Data stored on volumes will not be lost.
Umount volume​
To umount your volume from every compute resource type:
$ cgc volume umount <name>
example:
$ cgc volume umount getting-started
PVC has been successfully unmounted from all pods.
Unmounting a volume requires restarting all compute resources to which the volume was mounted. Any data stored on the ephemeral (temporary) disk storage will be lost. Before unmounting the volume, make sure you have saved all the data you want to keep. Data stored on volumes will not be lost.
Volume delete​
Same as a compute resource, you can delete a volume by using the following command. Be careful though, as those usually contain your data that usually needs persistance
cgc volume delete <name>
example:
$ cgc volume delete getting-started
Volume getting-started deleted.